from django.db.models.functions import datetime
from mongoengine import *


class Address(EmbeddedDocument):
	room_number = StringField()  # 房间号
	consignee = StringField()  # 收货人
	phone_number = StringField()  # 联系电话
	c_name = StringField()  # 收货地址配送社区
	p_name = StringField()  # 收货地址配送点
	point_address = StringField()  # 收货地址配送点详细地址


class User(Document):
	# 用户实体
	wechat_number = StringField()  # 微信号
	registration_date = DateTimeField(default=datetime.datetime.now)  # 注册日期required=True
	addresses = ListField(EmbeddedDocumentField(Address))  # 社区名称



